<template>
  <!-- 待交件 -->
  <div class="box clearfix">
    <section class="section_wrap">
      <FunctionalAreas
        :delivery="delivery"
        :orderNumber="orderNumber"
        :isBdc = "isBdc"
      ></FunctionalAreas>
      <div class="title_sub prduct_bod_r">产品说明：</div>
      <ProductDescriptionToo></ProductDescriptionToo>
    </section>
    <section class="section_wrap">
      <div class="title_sub infro_bod_l">信息查看：</div>
      <div class="state">状态：待交件</div>
      <InformationsViewer
        :orderNumber="orderNumber"
        :showButton="showButton"
      ></InformationsViewer>
    </section>
    <section class="section_wrap"  v-if="showFinancialInfo">
      <div class="title_sub infro_bod_l">财务信息:</div>
      <financialInfo :showBtn="showBtn" :orderNumber="orderNumber"></financialInfo>
    </section>
    <section class="section_wrap" v-show="showFillAnIn">
      <div class="title_sub infro_bod_l">补登信息：</div>
      <FillAnInFormation
        :orderNumber="orderNumber"
        @showbox="toshow"
      ></FillAnInFormation>
    </section>
    <section class="section_wrap">
      <div class="title_sub upload_bod_l">附件管理：</div>
      <!-- 上传组件 -->
      <Upload class="uploadStyle" ref="Uploade" :isNew="isNew"></Upload>
    </section>

    <section class="section_wrap">
      <div class="title_sub infro_bod_l">审批流：</div>
      <ApprovalText :orderNumber="orderNumber"></ApprovalText>
      <div class="title_sub infro_bod_l">操作记录：</div>
      <OperationRecords :orderNumber="orderNumber"></OperationRecords>
    </section>

  </div>
</template>

<script>
import FunctionalAreas from "../../components/businessList/FunctionalAreas";
import ProductDescriptionToo from "../../components/businessList/ProductDescriptionToo";
import InformationsViewer from "../../components/businessList/InformationsViewer";
import FillAnInFormation from "../../components/businessList/FillAnInFormation";
import ApprovalText from "../../components/businessList/ApprovalText";
import Upload from "../../components/businessList/Upload";
import OperationRecords from "../../components/businessList/OperationRecords";
import { getOrderOne } from "../../../src/assets/js/api";
import financialInfo from "../../components/business/financialInfo";
import {checkPermiss} from "../../assets/js/utlis";

export default {
  name: "ToSubmitList",
  components: {
    FunctionalAreas,
    ProductDescriptionToo,
    InformationsViewer,
    ApprovalText,
    FillAnInFormation,
    Upload,
    OperationRecords,
    financialInfo
  },
  data() {
    return {
      delivery: true,
      isNew: false,
      orderNumber: "",
      showButton: false,
      showFillAnIn: true,
      isBdc:"",
      golbalPermissions: []
    };
  },
  created() {
    this.orderNumber = sessionStorage.getItem("orderNumber");
    this.golbalPermissions = localStorage.getItem("permissions").split(",");

  },
  computed: {
    //财务信息按钮显示
    showBtn: function() {
      return checkPermiss("business:updateFinancial:lyf", this.golbalPermissions);

    },
    //财务信息
    showFinancialInfo: function() {
      return checkPermiss("business:upForm:financial:lyf", this.golbalPermissions);
    }
  },
  methods: {
        //查询产品模板
    getOrderOne(id) {
      getOrderOne(id).then(res => {
        this.isBdc = res.data.isBdc;
      });
    },
    toshow(msg) {
      this.showFillAnIn = msg;
    }
  }
};
</script>

<style scoped type="less">
.text {
  font-size: 20px;
  font-weight: bold;
  text-align: left;
  margin-top: 20px;
  text-indent: 2em;
}
.state {
  font-size: 22px;
  font-weight: bold;
  float: right;
  margin-top: -30px;
  margin-right: 3%;
}

.uploadStyle {
  width: 97%;
  position: relative;
  margin-top: 20px;
}
.information {
  border-bottom: 1px solid #000;
}
</style>
